import { createRouter, createWebHistory } from 'vue-router'
import sousuoView from '@/views/home/sousuo.vue'
import homeView from '@/views/home/home.vue'
import indexView from '@/views/home/children/index.vue'
import claView from '@/views/home/children/cla.vue'
import clarView from '@/views/home/children/clar.vue'
import myView from '@/views/home/children/my.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/home/index' },
    { path: '/sousuo', component: sousuoView },
    {
      path: '/home', component: homeView, children:
        [
          { path: 'index', component: indexView },
          { path: 'cla', component: claView },
          { path: 'clar', component: clarView },
          { path: 'my', component: myView },
        ]
    },

  ],
})

export default router
